package com.inspire.tank.strategy;

import com.inspire.tank.Bullet;
import com.inspire.tank.FireStrategy;
import com.inspire.tank.GameModel;
import com.inspire.tank.Tank;
import com.inspire.tank.decorator.RectDecorator;

/**
 * @author inspire
 * @description
 * @date 2022/6/5 22:29
 */
public class DefaultFireStrategy implements FireStrategy {
    public void fire(Tank t) {
        int bX=t.x+Tank.WIDTH/2- Bullet.WIDTH/2;
        int bY=t.y+Tank.HEIGHT/2-Bullet.HEIGHT/2;
        new Bullet(bX,bY,t.dir,t.group);

        /*if(t.group == Group.GOOD){
            new Thread(()->new Audio("D:\\dev_file\\Git_file\\tank\\src\\audio\\tank_fire.wav").loop()).start();
        }*/
    }
}
